import java.util.Calendar;

/**
 * @author Yuanbinbing
 * 输出当前的月份值以及对应的季节
 */
public class Task08_02 {
    public static void main(String[] args) {
        System.out.println("输入当前月份");
        Calendar cal=Calendar.getInstance();
        int mouth=cal.get(Calendar.MONTH);

        mouth=mouth+1;
        String season="";
        switch (mouth){
            case 3:
            case 4:
            case 5:
                season = "spring";
                break;
            case 6:
            case 7:
            case 8:
                season = "summer";
                break;
            case 9:
            case 10:
            case 11:
                season = "autumn";
                break;
            case 12:
            case 1:
            case 2:
                season = "winter";
                break;
            default:
                season="wrong";
                break;

        }
        System.out.println("当前月份"+mouth+"月:当前季节是"+season);
    }
}
